const mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');//引入分页模块
var NewsSchema = new mongoose.Schema({//定义数据模型，然后定义几个数据模型的字段
    title:String,
    desc:String,
    cateId:mongoose.Schema.ObjectId
})
NewsSchema.plugin(mongoosePaginate);//操作引入的插件
module.exports = mongoose.model('News',NewsSchema);//暴露用户和数据模块的接口